import request from '@/utils/request'

// 新增分组
export function addGroup(data) {
  return request({
    url: '/admin/admin/group',
    method: 'post',
    data
  })
}


// 查询分组
export function getGroup(params) {
  return request({
    url: '/admin/admin/group/list',
    method: 'get',
    params
  })
}


// 查询分组
export function editGroup(data) {
  return request({
    url: '/admin/admin/group',
    method: 'put',
    data
  })
}


// 删除分组
export function deleteGroup(groupId) {
  return request({
    url: `/admin/admin/group/${groupId}`,
    method: 'delete',
  })
}

// 查询人员列表
export function getStaffList(params) {
  return request({
    url: `/admin/admin/group/rel/list`,
    method: 'get',
    params
  })
}

// 添加员工
export function addStaff(data) {
  return request({
    url: `/admin/admin/group/rel`,
    method: 'post',
    data
  })
}

// 添加员工
export function deleteStaff(data) {
  return request({
    url: `/admin/admin/group/rel`,
    method: 'delete',
    data
  })
}